package com.hongxinguoji.manager.article.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hongxinguoji.manager.article.service.IArticleCatService;
import com.hongxinguoji.manager.common.util.EasyUITreeNode;

@Controller
@RequestMapping("/article/cat")
public class ArticleCatController {

	@Autowired
	private IArticleCatService articleCatService;

	@RequestMapping("/list")
	@ResponseBody
	public List<EasyUITreeNode> getArticleCatList(@RequestParam(value = "id", defaultValue = "-1") Long parentId) {
		List<EasyUITreeNode> list = articleCatService.getArticleCatList(parentId);
		return list;

	}
}
